﻿using System;
using System.Collections.Generic;
using AgileBoard.Domain;

namespace AgileBoard.Demo
{
    public class FakeTaskData
    {
        public static List<Task> CreateTestTasks()
        {
            var tasks = new List<Task>
                            {
                                ToDoTask1(),
                                ToDoTask2(),
                                ToDoTask3(),
                                ToDoTask4(),
                                ToDoTask5(),
                                ToDoTask6(),
                                ToDoTask7(),
                                ToDoTask8(),
                                ToDoTask9(),
                                ToDoTask10(),
                                ToDoTask11(),
                                ToDoTask12(),
                                ToDoTask21(),
                                ToDoTask22(),
                                ToDoTask23()
                            };

            for (int i = 0; i < 10; i++)
            {
                var sampleTask = new Task
                                     {
                                         TaskID = Guid.NewGuid(),
                                         IterationID = "2EBDBC36-3585-47b3-8709-BE3184956938",
                                         Name = "New Task",
                                         Primary = true,
                                         CreateDate = DateTime.Now,
                                         Evaluation = 10.0,
                                         CreateTime = DateTime.Now
                                     };

                //tasks.Add(sampleTask);
            }

            return tasks;
        }

        public static Task ToDoTask()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("29DC7A46-52B5-4941-AAE2-F48592847E42"),
                               IterationID = "29DC7A46-52B5-4941-AAE2-F48592847E42",
                               Name = "todo task",
                               Primary = true,
                               CreateDate = DateTime.Now,
                               Evaluation = 10.0,
                               Remaining = 10.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory();

            return todo;
        }

        public static Task ToDoTask1()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("36CA3095-D519-49c8-8CAD-8BD79F4E1508"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Make our server connect and authenticate to the provider system",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 4.0,
                               Remaining = 8.0,
                               Beyond = 4.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory6();
            todo.Status = FakeStatusData.InProgressStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest());
            todo.AddActual(FakeActualData.ActualOfYest());
            todo.AddActual(FakeActualData.ActualOfToday());

            return todo;
        }

        public static Task ToDoTask2()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("8157D54F-A294-44fc-8F82-06A1983B47DC"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Read provider's data directory",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               FinishDate = DateTime.Now,
                               Evaluation = 8.0,
                               Remaining = 0.0,
                               Beyond = 8.0,
                               Color = "#51FF51",
                               AssignedTo = FakeUserData.DemoDeveloper(),
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory6();
            todo.Status = FakeStatusData.DoneStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest2());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest2());
            todo.AddActual(FakeActualData.ActualOfYest2());
            todo.AddActual(FakeActualData.ActualOfToday2());

            return todo;
        }


        public static Task ToDoTask3()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("296FBD35-F617-47a2-B25D-E2AC629D60DC"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Parse the current temperature out of the data",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 6.0,
                               Color = "#51FF51",
                               AssignedTo = FakeUserData.DemoDeveloper(),
                               Remaining = 4.0,
                               Beyond = 2.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory6();
            todo.Status = FakeStatusData.InProgressStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest3());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest3());
            todo.AddActual(FakeActualData.ActualOfYest3());
            todo.AddActual(FakeActualData.ActualOfToday3());

            return todo;
        }

        public static Task ToDoTask4()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("54129D08-9455-4dde-B6C5-0CAFAF9F2824"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Push the temperature data to the client",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 16.0,
                               Color = "#64B1FF",
                               AssignedTo = FakeUserData.DemoLeadDeveloper(),
                               Remaining = 16.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory6();
            todo.Status = FakeStatusData.OnTestStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest4());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest4());
            todo.AddActual(FakeActualData.ActualOfYest4());
            todo.AddActual(FakeActualData.ActualOfToday4());

            return todo;
        }


        public static Task ToDoTask5()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("BA58C54C-59EC-4b68-A30C-181FEBBA9B33"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Parse snow/rain data from the provider's data",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 4.0,
                               Color = "#64B1FF",
                               AssignedTo = FakeUserData.DemoLeadDeveloper(),
                               Remaining = 4.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory7();
            todo.Status = FakeStatusData.InProgressStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest5());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest5());
            todo.AddActual(FakeActualData.ActualOfYest5());
            todo.AddActual(FakeActualData.ActualOfToday5());

            return todo;
        }

        public static Task ToDoTask6()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("1E93A27C-B385-45b4-A36E-128450202E38"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Push the snow/rain data to the client",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 4.0,
                               Remaining = 4.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory7();
            todo.Status = FakeStatusData.InProgressStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest6());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest6());
            todo.AddActual(FakeActualData.ActualOfYest6());
            todo.AddActual(FakeActualData.ActualOfToday6());

            return todo;
        }

        public static Task ToDoTask7()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("40CFD40A-64C7-46da-8B6E-726DC2D2E132"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Redesign client screen a bit",
                               Primary = true,
                               CreateDate = DateTime.Now,
                               Evaluation = 0.0,
                               Remaining = 0.0,
                               Color = "#51FF51",
                               AssignedTo = FakeUserData.DemoDeveloper(),
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory7();
            todo.Status = FakeStatusData.ToDoStatus();

            return todo;
        }

        public static Task ToDoTask8()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("DDB9E6A2-7C0E-446e-9279-476CAB5BC935"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Refactor the server code",
                               Primary = true,
                               CreateDate = DateTime.Now,
                               Color = "#64B1FF",
                               AssignedTo = FakeUserData.DemoLeadDeveloper(),
                               Evaluation = 0.0,
                               Remaining = 0.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Status = FakeStatusData.ToDoStatus();
            todo.Story = FakeStoryData.DemoStory7();

            return todo;
        }

        public static Task ToDoTask9()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("E317E5AC-CBF1-4f94-86B0-19C7ABD50EA8"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Parse the weather data in day packs",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 10.0,
                               Remaining = 10.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory8();
            todo.Status = FakeStatusData.ToDoStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest9());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest9());
            todo.AddActual(FakeActualData.ActualOfYest9());
            todo.AddActual(FakeActualData.ActualOfToday9());

            return todo;
        }

        public static Task ToDoTask10()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("1C013A6D-AF89-4ad2-AEB9-ED4C0343881B"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Push several days data to the client",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 3.0,
                               Remaining = 3.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory8();
            todo.Status = FakeStatusData.ToDoStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest10());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest10());
            todo.AddActual(FakeActualData.ActualOfYest10());
            todo.AddActual(FakeActualData.ActualOfToday10());

            return todo;
        }

        public static Task ToDoTask11()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("62EB2C35-1ED0-498e-9A5E-7B0359CE9400"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Make the client ping server once per 4 hours",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 6.0,
                               Remaining = 6.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory9();
            todo.Status = FakeStatusData.ToDoStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest11());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest11());
            todo.AddActual(FakeActualData.ActualOfYest11());
            todo.AddActual(FakeActualData.ActualOfToday11());


            return todo;
        }

        public static Task ToDoTask12()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("C0D9C846-21A7-4ce9-B911-1B3594A7C2BF"),
                               IterationID = "8DD80B5B-CE96-4dd4-882D-2EAA1859C37F",
                               Name = "Make the server update the client",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(3),
                               StartDate = DateTime.Now.RemoveDays(3),
                               Evaluation = 2.0,
                               Remaining = 2.0,
                               Beyond = 0.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory9();
            todo.Status = FakeStatusData.ToDoStatus();
            todo.AddActual(FakeActualData.ActualOf2DaysBeforeYest12());
            todo.AddActual(FakeActualData.ActualOfDayBeforeYest12());
            todo.AddActual(FakeActualData.ActualOfYest12());
            todo.AddActual(FakeActualData.ActualOfToday12());


            return todo;
        }

        public static Task InProgressTask()
        {
            var inProgress = new Task
                                 {
                                     TaskID = new Guid("BE4B0656-8685-439e-B4EA-66D5C9BA7508"),
                                     IterationID = "BE4B0656-8685-439e-B4EA-66D5C9BA7508",
                                     Name = "inprogress Task",
                                     Primary = true,
                                     CreateDate = DateTime.Now,
                                     Evaluation = 10.0,
                                     CreateTime = DateTime.Now
                                 };

            inProgress.AddActual(FakeActualData.CreateTestActual()[0]);
            inProgress.Story = FakeStoryData.DemoStory();

            return inProgress;
        }

        public static Task DoneTask()
        {
            var Done = new Task
                           {
                               TaskID = new Guid("860746BC-810F-43bb-A5C5-87B12A6FC6DC"),
                               IterationID = "BE4B0656-8685-439e-B4EA-66D5C9BA7508",
                               Name = "Done Task",
                               Primary = true,
                               CreateDate = DateTime.Now,
                               Evaluation = 10.0,
                               CreateTime = DateTime.Now
                           };

            Done.AddActual(FakeActualData.CreateTestActual()[0]);
            Done.Story = FakeStoryData.DefaultStory();

            return Done;
        }

        public static Task OnTestTask()
        {
            var OnTest = new Task
                             {
                                 TaskID = new Guid("126D4D30-3AD9-48ef-A62D-E7710584E10B"),
                                 IterationID = "BE4B0656-8685-439e-B4EA-66D5C9BA7508",
                                 Name = "on test Task",
                                 Primary = true,
                                 CreateDate = DateTime.Now,
                                 Evaluation = 10.0,
                                 CreateTime = DateTime.Now
                             };

            OnTest.AddActual(FakeActualData.CreateTestActual()[0]);
            OnTest.Story = FakeStoryData.DefaultStory();

            return OnTest;
        }

        public static Task ToDoTask21()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("F99D00B5-ACEA-49ab-82B1-C8AE57D7CB80"),
                               IterationID = "25A996D0-842A-4bb3-A081-E0B762F9B4AB",
                               Name = "Double click me to edit.",
                               AssignedTo = FakeUserData.DemoDeveloper(),
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(17),
                               Color = "#51FF51",
                               StartDate = DateTime.Now.RemoveDays(10),
                               FinishDate = DateTime.Now.RemoveDays(5),
                               Evaluation = 8.0,
                               Remaining = 0.0,
                               Beyond = 8.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory11();
            todo.Status = FakeStatusData.DoneStatus();

            return todo;
        }

        public static Task ToDoTask22()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("400D97AC-52EB-4e02-BCEF-2A2D4482CAD7"),
                               IterationID = "25A996D0-842A-4bb3-A081-E0B762F9B4AB",
                               Name =
                                   "Right click on me to delete. Done by Demo Developer and my tasks can be identified by this color",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(17),
                               AssignedTo = FakeUserData.DemoDeveloper(),
                               Color = "#51FF51",
                               StartDate = DateTime.Now.RemoveDays(17),
                               FinishDate = DateTime.Now.RemoveDays(10),
                               Evaluation = 4.0,
                               Remaining = 0.0,
                               Beyond = 4.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory11();
            todo.Status = FakeStatusData.DoneStatus();

            return todo;
        }

        public static Task ToDoTask23()
        {
            var todo = new Task
                           {
                               TaskID = new Guid("725B0000-EDFB-47c7-8EA2-3C1FF57A15E3"),
                               IterationID = "25A996D0-842A-4bb3-A081-E0B762F9B4AB",
                               Name = "Some task",
                               Primary = true,
                               CreateDate = DateTime.Now.RemoveDays(17),
                               StartDate = DateTime.Now.RemoveDays(10),
                               FinishDate = DateTime.Now.RemoveDays(5),
                               Evaluation = 8.0,
                               Remaining = 0.0,
                               Beyond = 8.0,
                               CreateTime = DateTime.Now
                           };

            //todo.AddActual(FakeActualData.CreateTestActual()[0]);
            todo.Story = FakeStoryData.DemoStory10();
            todo.Status = FakeStatusData.DoneStatus();

            return todo;
        }
    }
}